#pragma once

#include <string>
#include <vector>

namespace kryptos { namespace selection {

class SelectionManager
{
public:

    static bool initialized();
    static SelectionManager& manager(const std::string& appName="");

    virtual ~SelectionManager();

    void lookForSelection();
    bool isDataSelected();
    bool selectionIsFileSelection();
    bool selectionIsTextSelection();

    std::vector<unsigned char> selectedData();

    int replaceSelection(const char* data, int usePlainText, bool openEditor = false, bool dontCheckResult = false);

private:

    SelectionManager(const char * windowTitle,
                     unsigned int time_before_paste=200,
                     unsigned int time_after_paste=400,
                     unsigned int time_between_keystrokes=100);

    std::vector<unsigned char> m_dataSelection;
    short                      m_selectionType;
};


}}
